using System;
using System.Collections.Generic;
using System.Text;
using Atom.Core;

namespace MTVMusicPlugin
{
  public class ArtistEntry
  {
    private AtomEntry entry;

    public AtomEntry Entry
    {
      get { return entry; }
      set { entry = value; }
    }



    public string VideosUrl
    {
      get
      {
        foreach (AtomLink al in Entry.Links)
        {
          return string.Format("{0}videos/", Entry.Id.ToString());
        }
        return "";
      }
    }

    public string RelatatedUrl
    {
      get
      {
        foreach (AtomLink al in Entry.Links)
        {
          return string.Format("{0}related/", Entry.Id.ToString());
        }
        return "";
      }
    }

    public string GenreUrl
    {
      get
      {
        string s = "";
        foreach (AtomLink al in Entry.Links)
        {
          if (al.HRef.ToString().Contains("/genre") && !al.HRef.ToString().Contains("related"))
            return al.HRef.ToString();
        }
        return s;
      }
    }

    public string Genre
    {
      get
      {
        string s = "";
        foreach (AtomLink al in Entry.Links)
        {
          if (al.HRef.ToString().Contains("/genre") && !al.HRef.ToString().Contains("related"))
            return al.Title;
        }
        return s;
      }
    }

    public ArtistEntry()
    {
      Entry = new AtomEntry();
    }

    public ArtistEntry(AtomEntry ae)
    {
      Entry = ae;
    }

  }
}
